package com.ruoyi.supermarket.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysDept;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 商品分类对象 tb_category
 * 
 * @author ruoyi
 * @date 2024-05-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Category
{
    private static final long serialVersionUID = 1L;

    /** 分类id */
    private Long categoryId;

    /** 父分类  0为主 */
    @Excel(name = "父分类  0为主")
    private Long fcategoryId;

    /** 组级列表 */
    @Excel(name = "组级列表")
    private String ancestors;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    private Long orderNum;

    /** 创建人姓名 */
    @Excel(name = "创建人姓名")
    private String createName;

    /** 修改人姓名 */
    @Excel(name = "修改人姓名")
    private String updateName;

    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private List<Category> children = new ArrayList<Category>();
    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }
    public void setFcategoryId(Long fcategoryId) 
    {
        this.fcategoryId = fcategoryId;
    }

    public Long getFcategoryId() 
    {
        return fcategoryId;
    }
    public void setAncestors(String ancestors) 
    {
        this.ancestors = ancestors;
    }

    public String getAncestors() 
    {
        return ancestors;
    }
    public void setCategoryName(String categoryName) 
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName() 
    {
        return categoryName;
    }
    public void setOrderNum(Long orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Long getOrderNum() 
    {
        return orderNum;
    }
    public void setCreateName(String createName) 
    {
        this.createName = createName;
    }

    public String getCreateName() 
    {
        return createName;
    }
    public void setUpdateName(String updateName) 
    {
        this.updateName = updateName;
    }

    public String getUpdateName() 
    {
        return updateName;
    }

}
